package com.insist.dao;

import com.insist.entity.OrderInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by Administrator on 2016/7/1.
 */
public interface OrderInfoDao  extends JpaRepository<OrderInfo,Long> {
    List<OrderInfo> findByUserId(Long loginUserId);

    @Query("select max(o.orderNo) from OrderInfo o")
    String getMaxOrderNo();
}
